#pragma once

#include "Value.h"

using namespace System;
using namespace System::Collections::Generic;

namespace SNMP 
{
	public ref class VariableBindingsList
	{
	internal:
		HSNMP_VBL m_hVbl;
		HSNMP_SESSION m_hSession;
		Dictionary<String^, Value^>^ m_dicValueCollections;

	public: 
		property int Count
		{
			int get(void)
			{ 
				int count = this->m_dicValueCollections->Count;
				return count;
			}
		};

		property Dictionary<String^, Value^>^ Data
		{
			Dictionary<String^, Value^>^ get(void)
			{ 
				return this->m_dicValueCollections;
			}
		};

	public:
		~VariableBindingsList(void);
		void Clear(void);
		void Add(System::String^ oid, Value^ value);
		void DictionaryToVbl(void);
		static Dictionary<String^, Value^>^ VblToDictionary(HSNMP_VBL hVbl);

	internal:
		VariableBindingsList(void);
		VariableBindingsList(HSNMP_SESSION hSession, HSNMP_VBL hVbl);
		void CreateVblHandle(HSNMP_SESSION hSession);
		void AddToVbl(System::String^ oid, Value^ value);

	private:
		static unsigned long GetCount(HSNMP_VBL hVbl);
	};
}